﻿using ERPSystem.Common.BaseEntitys;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERPSystem.Common.Domains.PurchaseInvoiceCommon
{
    /// <summary>
    /// 采购发票子表
    /// </summary>
    [SugarTable("PurchaseInvoiceSubtables")]
    public class PurchaseInvoiceSubtable : BaseEntity
    {
        /// <summary>
        /// 采购发票子表编号
        /// </summary>
        [SugarColumn(IsIdentity =true,IsPrimaryKey =true)]
        public int PurchaseInvoiceSubtableId { get; set; }
        /// <summary>
        /// 采购订单号
        /// </summary>
        [SugarColumn(ColumnDataType ="Nvarchar(100)",IsNullable =true)]
        public string PurchaseON { get; set; }
        /// <summary>
        /// 仓库
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string Warehouse { get; set; }
        /// <summary>
        /// 入库单号
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string InventoryRN { get; set; }
        /// <summary>
        /// 物流编码
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string LogisticsCode { get; set; }
        /// <summary>
        /// 物流名称
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string NameOfLogistics { get; set; }
        /// <summary>
        /// 型号规格
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string ModelSpecification { get; set; }
        /// <summary>
        /// 主计量
        /// </summary>
        public int MainMetering { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Num { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 税率
        /// </summary>
        public decimal TaxRate { get; set; }
        /// <summary>
        /// 税额
        /// </summary>
        public decimal AmountOfTax { get; set; }
        /// <summary>
        /// 流水号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(100)")]
        public string SerialNumber { get; set; }
    }
}
